﻿@using GSLMS.Entity
@model TB_APP_REGINFO
@{
    Layout = null;
    var ddlSource = ViewData["Source"] as SelectList;
    var ddlImportantLevel = ViewData["ImportantLevel"] as SelectList;
    var ddlIsSystemStop = ViewData["RegIsSystemStop"] as SelectList;
    var logList = Model.LogInfoList as List<TB_APP_LOGINFO> ?? new List<TB_APP_LOGINFO>();
    var logOnly = (int)ViewData["logOnly"];
}
<div id="divRegLog">
    <div class="pageContent" layouth="5">
        <div style="display:@(logOnly == 1 ? "none" : "inline");">
            <form method="post" action="DianDang/Apply/ApplyList/RegLog?OpID=@ViewData["OperateID"]" class="pageForm required-validate"
    onsubmit="return validateCallback(this, dialogAjaxDone);">
            @Html.ValidationSummary(true)
            <div class="pageFormContent" layouth="350">
                @Html.Hidden("RegInfoID", Model.ID)
                <p>
                    <label>
                        客户名称：</label>
                    @Html.TextBox("CUSTNAME", Model.CUSTNAME, new { @class = "required", @readonly = "true" })
                </p>
                <p>
                    <label>
                        证件号码：</label>
                    @Html.TextBox("CUSTNO", Model.CUSTNO, new { @class = "required", @readonly = "true" })
                    @Html.ValidationMessageFor(model => Model.CUSTNO)
                    @* <a class="button" href="javascript:;"><span>验证</span></a>*@
                </p>
                <p>
                    <label>
                        来源渠道：</label>
                    @Html.DropDownListFor(model => Model.SOURCE, ddlSource, new { @class = "combox", @selectedvalue = Model.SOURCE })
                    @Html.ValidationMessageFor(model => Model.SOURCE)
                </p>
                <p>
                    <label>
                        记录时间：</label>
                    @Html.TextBoxFor(model => model.LOGTIME, new { @class = "required", @readonly = "true", @formatDate = "yyyy-MM-dd" })
                    @Html.ValidationMessageFor(model => model.LOGTIME)
                </p>
                <p>
                    <label>
                        跟进人：</label>
                    @Html.TextBoxFor(model => model.LOGBY, new { @class = "required", @readonly = "true" })
                    @Html.ValidationMessageFor(model => model.LOGBY)
                </p>
                <p>
                    <label>
                        重要级别：</label>
                    @Html.DropDownListFor(model => model.IMPORTANTLEVEL, ddlImportantLevel, new { @class = "combox", @selectedvalue = Model.IMPORTANTLEVEL })
                    @Html.ValidationMessageFor(model => Model.IMPORTANTLEVEL)
                </p>
                <p style="width: 95%">
                    <label>
                        是否中止：</label>
                    @Html.RadioButton("ISSYSTEMSTOP", 1, Model.ISSYSTEMSTOP != 0)<span>是 &nbsp;</span>
                    @Html.RadioButton("ISSYSTEMSTOP", 0, Model.ISSYSTEMSTOP == 0)<span>否 &nbsp;</span>
                </p>
                <div class="divider" />
                <p style="width: 90%">
                    <label>
                        情况说明：</label>
                    @Html.TextAreaFor(model => model.DETAIL, new { @cols = "70", @rows = "3" })
                    @Html.ValidationMessageFor(model => model.DETAIL)
                </p>
            </div>
            @if (Model.ISSYSTEMSTOP == 0)
            {
                @Html.Partial("FormButtonBar")
            }
            </form>
            <div class="divider" />
        </div>
        <table class="list" width="100%">
            <thead>
                <tr class="header">
                    <th colspan="3" style="text-align: left; font-weight: bold;">
                        日志
                    </th>
                </tr>
            </thead>
            @foreach (var item in logList)
            {            
                <tr>
                    <td>
                        <span formatdate="yyyy-MM-dd">@item.LOGTIME</span>
                    </td>
                    <td>
                        @item.LOGTYPE
                    </td>
                    <td>
                        @item.DETAIL
                    </td>
                </tr>         
            }
        </table>
    </div>
</div>
